package com.cyy.dyeing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyy.dyeing.dto.ProcessNode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @Author: cyy
 * @Date: 2024/7/28
 */
@Mapper
public interface ProcessNodeMapper extends BaseMapper<ProcessNode> {
    @Update("update t_process_node set pn_curr=0 where exists(" +
            "select pd_id from t_process_def where pd_id=t_process_node.pd_id and group_id=#{groupId}" +
            "and pd_cls=#{grocessDefCls})")
    void updateAllGroupProcessNodeCurrFalse(String groupId, int processDefCls);
}
